package chuangyi.com.org.ViewModel;

import android.content.Context;
import android.databinding.Bindable;
import android.support.annotation.LayoutRes;
import android.view.View;

import chuangyi.com.org.DOMIHome.adapter.BindingListItem;

/**
 * Created by zxh on 16/12/9.
 */

public class PayItem extends BindingListItem {
    private int src;
    private int type;
    private String name;
    private PayModel parent;
    private Object payData;

    public PayModel getParent() {
        return parent;
    }

    public Object getPayData() {
        return payData;
    }

    public void setPayData(Object payData) {
        this.payData = payData;
    }

    public void setParent(PayModel parent) {
        this.parent = parent;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    @Bindable
    public int getSrc() {
        return src;
    }

    public void setSrc(int src) {
        this.src = src;
    }

    @Bindable
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public PayItem(Context context, @LayoutRes int layoutId){
        super(context, layoutId);
    }

    public void onClickItem(View view){
        this.parent.onPay(this);
    }


}
